package com.itfitness.changettfdemo;

import android.app.Application;
import android.graphics.Typeface;

import java.lang.reflect.Field;

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        changeTTF();
    }

    private void changeTTF() {
        Typeface typefaceALTAN = Typeface.createFromAsset(getAssets(), "fonts/ALTAN.TTF");
        try {
            Field typefaceField = Typeface.class.getDeclaredField("MONOSPACE");
            typefaceField.setAccessible(true);
            typefaceField.set(null,typefaceALTAN);
        }catch (Exception e){}
    }
}
